﻿<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>快递列表</title>
    <link rel="stylesheet" type="text/css" href="/CMS/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="/CMS/css/express.css"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/DefaultSkin.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/load.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/control.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/list.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/anim.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/page.css?v=1.0"/><!-- 这个里面有字体,加个版本号不进行更新 -->
    <link rel="stylesheet" type="text/css" href="/IMS/css/comm.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/select2/select2.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/zTreeStyle/zTreeStyle.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/core.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/js/plugins/file/uploadify/uploadify.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/js/plugins/treeview/jquery.treeview.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/multi-select.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/js/plugins/bsgrid/bsgrid.all.min.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/js/plugins/bsgrid/bsgrid.all.min.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/jeasy-ui/easyui.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css"
          href="/IMS/js/plugins/poshytip/tip-darkgray/tip-darkgray.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/addinfo.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/prettyPhoto.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/jquery-ui-1.10.4.custom.min.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/jquery.editable-select.min.css?v=20180712190507493"/>
    <script type="text/javascript" src="/IMS/js/jquery-1.11.2.min.js?v=20180712190507542"></script>
    <!-- 新增加 -->
    <script type="text/javascript" src="/IMS/js/plugins/comm/jquery-ajax.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/comm/securityProtect.js?v=20180712190507542"></script>
    <script type="text/javascript"
            src="/IMS/js/plugins/comm/jquery-ajax-response-handler.js?v=20180712190507542"></script>
    <!-- 新增加 END -->
    <script type="text/javascript" src="/IMS/js/common/public-obj.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/common/bind.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/common/controls.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/common/slide.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/common/switch.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/common/initial.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/common/print/printhtml.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/common/listBox.js?v=20180712190507542"></script>

    <script type="text/javascript" src="/IMS/js/plugins/My97DatePicker/WdatePicker.js?v=20180712190507542"></script>
    <script type="text/javascript"
            src="/IMS/js/plugins/file/uploadify/jquery.uploadify.min.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/layer/layer.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/select2/select2.full.min.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/select2/i18n/zh-CN.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/treeview/jquery.treeview.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/form/jquery.form.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/ztree/jquery.ztree.core-3.5.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/ztree/jquery.ztree.excheck-3.5.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/comm/constant.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/comm/common.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/comm/bmsAjax.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/comm/validata.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/validate/jquery.validate.js?v=20180712190507542"></script>
    <script type="text/javascript"
            src="/IMS/js/plugins/validate/localization/messages_zh.min.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/validate/regValidate.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/common/popup_layer.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/common/jqueryPlugins/jquery_magnifier.js?v=20180712190507542"></script>
    <script type="text/javascript"
            src="/IMS/js/common/jqueryPlugins/jquery.multi-select.js?v=20180712190507542"></script>
    <script type="text/javascript"
            src="/IMS/js/common/jqueryPlugins/jquery.quicksearch.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/jquery.easyui.min.js?v=20180712190507542"></script>
    <script type="text/javascript"
            src="/IMS/js/common/jqueryPlugins/jquery.prettyPhoto.js?v=20180712190507542"></script>

    <script type="text/javascript" src="/IMS/js/plugins/bsgrid/grid.zh-CN.min.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/bsgrid/bsgrid.all.min.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/bsgrid/grid.extend.min.js?v=20180712190507542"></script>
    <script type="text/javascript" charset="UTF-8"
            src="/IMS/js/plugins/poshytip/jquery.poshytip.js?v=20180712190507542"></script>

    <script type="text/javascript"
            src="/IMS/js/common/jqueryPlugins/jquery-ui-1.10.4.custom.min.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/common/joinUs/AddListBox.js?v=20180712190507542"></script>
    <script type="text/javascript"
            src="/IMS/js/common/jqueryPlugins/jquery.editable-select.min.js?v=20180712190507542"></script>

    <!-- echarts -->
    <script type="text/javascript" src="/IMS/js/plugins/echarts/dist/echarts.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/echarts/dist/chart/bar.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/echarts/dist/chart/line.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/echarts/dist/chart/pie.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/echarts/dist/chart/funnel.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/echarts/dist/chart/funnel.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/CMS/js/express/index.js"></script>

</head>
<body>

<div>
    <div class="icip_title_box" style="margin-bottom: 20px;">
        <div class="left">
            <span class="icip_title_text" style="margin-left: 20px;">录入派单人员</span>
            <span class="icip_button">
                    <a href="/CMS/repiarInfo/showList.ht">返回上级</a>
                </span>
        </div>

    </div>
</div>
<form id="form1" action="" method="POST">
    <div class="container express-box">
        <div class="row">
            <table id='tabletest' class="table table-hover express-table"
                   style="width: 100%;margin-bottom: 0;table-layout: fixed;">
                <col width="5%"/>
                <col width="15%"/>
                <col width="35%"/>
                <col width="10%"/>
                <col width="30%"/>
                <col width="5%"/>
                <tr>
                    <th width="5%">姓名</th>
                    <th width="25%">手机号</th>
                    <th width="35%">小区</th>
                    <th width="10%">部门</th>
                    <th width="30%">职位</th>
                    <th width="5%">操作</th>
                </tr>
                <!--<tr class="comp-main">
                    <td >警告</td>
                    <td>济南万达金街</td>
                    <td>街内垃圾未清理</td>
                    <td>10:25:56</td>
                    <td></td>
                    <td><input class="delete-btn btn btn-default" type="button" name="" id="" value="删除"/></td>
                </tr>
                -->
            </table>
            <div class="none-text">暂无数据</div>
        </div>
    </div>
</form>
</body>
<script type="text/javascript">
    $(function () {
        $.ajax({
            url: '/CMS/repiarInfo/geteinfo.ht',
            type: 'get',
            dataType: 'json',
            success: function (data) {
                //   var dataObj = result;
                //console.log(data)
                $.each(data.data, function (index, item) {

                    var sendpeople;
                    sendpeople = '<td width="5%">' + item.streName + '</td>'
                        + '<td width="25%">' + item.strPhone + '</td>'
                        + '<td  width="25%">' + item.strComName + '</td>'
                        + '<td width="10%">' + item.strDepName + '</td>'
                        + '<td width="10%">' + item.strPosName + '</td>'
                        + '<td width="5%"><input class="delete-btn btn btn-default paidan " type="button" name="strEid" id="'+item.strEid+'" value="派单" /></td>';
                    $("#tabletest").append('<tr>' + sendpeople + '</tr>');

                });
            }

        })
      function getUrlParam(name) {
            // console.log($("iframe"));
            var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
            var url = $(window.parent.document).find("iframe").contents().find("html").attr("uri");
            var index=url.lastIndexOf("?");
            url=url.substring(index+1,url.length);
            var index=url.lastIndexOf("=");
            url=url.substring(index+1,url.length);
            return url;
        }

        //接收URL中的参数rid
        var Rid = getUrlParam('strRId');


        $(document).on("click", '.paidan', function () {
           function getUrlParam(name) {
            // console.log($("iframe"));
            var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
            var url = $(window.parent.document).find("iframe").contents().find("html").attr("uri");
            var index=url.lastIndexOf("?");
            url=url.substring(index+1,url.length);
            var index=url.lastIndexOf("=");
            url=url.substring(index+1,url.length);
            return url;
        }

        //接收URL中的参数rid
        var Rid = getUrlParam('strRId');
            var strEid = $(this).attr('id');
            if (confirm("确定要派单吗？")) {
                window.event.returnValue = true;
            } else {
                window.event.returnValue = false;
            }
            if (window.event.returnValue == true) {

              var checkDelUrl = '/CMS/repiarInfo/savesend.ht?strEid=' + strEid ,
			checkDelUrl = checkDelUrl+ "&strRid=" + Rid

                $.ajax({
                    url:checkDelUrl,
                    type: 'get',
                    dataType: 'json',
                   // data: {strRId: Rid, strEid: strEid},
                    success: function (result) {
                        //alert(Rid)
                        //alert(strEid)
                        layer.msg("派单成功!")
                        //成功后页面跳转
                        var url = '/CMS/repiarInfo/showList.ht';

                        $.go(url, {
                            dataType: 'html',
                            beforeSend: function () {
                                showProccessBar();
                            },
                            error: function () {
                                hideProccessBar();
                            },
                            success: function (data, textStatus) {
                                replaceDocument(url, data);
                            }
                        });
                    },
                    error: function () {
                        layer.msg("派单失败!")
                    }
                })
            }
        })
    })
        //获取url中的参数





</script>

</html>